﻿using Fozzy;
using Fozzy.Skin;
using System.Collections.Generic;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Input;

namespace Microsoft.FamilyShow
{
    public class Skin                                                       : Fozzy.WPF.Skin
    {
        #region Declarations
            //private static readonly RoutedCommand ChangeSkinCommand         = new RoutedCommand("ChangeSkin", typeof(MainWindow))                                               ;
        #endregion

        #region Structure
            public override Directory       Directory                       { get { return Directory.Remove(Names.Directory)                ; } }
            private Resource                Names                           { get { return Module.Resources.Names                           ; } }
        #endregion

        #region Constructeur
            public Skin(Fozzy.File file)                                    : base("ChangeSkin", typeof(MainWindow), file)
            {}
            //public Skin(string fullName)                                    : base(new Uri(fullName), typeof(MainWindow))
            //{}
        #endregion

            protected override void Prepare()
            {
                base.Prepare()                                              ;
                Module.Resources            = new Resources(Resources)      ;
            }

            /// <summary>
            /// save the skin setting
            /// </summary>
            protected override void Re_Name()
            {
                base.Re_Name()                                              ;
                Module.Settings.Save(Name)                                  ;
            }
    }

}
